/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.src.ptit.javatraining.huynh.btvn2;

import java.io.BufferedReader;
import java.io.FileReader;

/**
 *
 * @author user
 */
public class Bai5 {
    public static void main(String[] args) {
        String s;
        try{
            FileReader f5 = new FileReader("Bai5.in");
            BufferedReader fin = new BufferedReader(f5);
            s = fin.readLine();
            String s2 = s;
            s2 = s2.toUpperCase();
            if(s.length()<1) throw new Exception("Null pointer!");
            int dem1= 0,dem2=0,dem3 =0,dEm1=0,dEm2=0,dEm3=0 ;
            for(int i=0;i<s.length();i++){
                if(s.charAt(i)=='A') dem1 ++;
                if(s.charAt(i)=='B') dem2 ++;
                if(s.charAt(i)=='C') dem3 ++;
                if(s2.charAt(i)=='A') dEm1 ++;
                if(s2.charAt(i)=='B') dEm2 ++;
                if(s2.charAt(i)=='C') dEm3 ++;
            }
            
            System.out.println("Not ignore Case:");
            System.out.println(" A : "+dem1+" times ! ");
            System.out.println(" B : "+dem2+" times ! ");
            System.out.println(" C : "+dem3+" times ! ");
             System.out.println("Ignore Case:");
            System.out.println(" A : "+dEm1+" times ! ");
            System.out.println(" B : "+dEm2+" times ! ");
            System.out.println(" C : "+dEm3+" times ! ");
        }catch(Exception e){
            System.out.println("Error "+e);
        }
    }
    
}
